﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Game.Lib
{
    class Log
    {
        public static void Write(string str)
        {
            try
            {
                FileStream fs = new FileStream(@".\server.log", FileMode.Append, FileAccess.Write);
                string str2 = "[" + DateTime.Now.ToLocalTime()+"] " + str;
                StreamWriter sw = new StreamWriter(fs);
                sw.WriteLine(str2);
                sw.Close();
            }
            catch (IOException err)
            {
                throw (new ApplicationException(err.Message));
            }
        }
    }
}
